package me.keiwu.user.domain;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Created by kei on 26/03/2018.
 */
@Data
@Entity
@Table(
        indexes = {
                @Index(name = "idx_uid", columnList = "userId")
        },
        uniqueConstraints = {
                @UniqueConstraint(name = "uidx_uid_gid", columnNames = {"userId", "openGid"})
        }
)
public class UserGroup extends AbstractBaseEntity {


    @Id
    @GeneratedValue
    private Long id;

    private Long userId;

    private String openGid;

    private String groupName;

}
